package com.egitim.cati;

	import com.egitim.model.Etiket;
	import com.egitim.model.Etiket_;
	import java.util.Collection;
	import java.util.List;
	import javax.annotation.PostConstruct;
	import javax.ejb.Stateful;
	import javax.enterprise.context.ConversationScoped;
	import javax.inject.Named;
	import javax.persistence.criteria.Root;
 
	
	/**
	 *
	 * @author Murat Hunoglu
	 */
	@Named("listIwaBean")
	@Stateful
	@ConversationScoped
	public class EtiketQueryBean extends CriteriaApiQuery<Etiket> {
	
	    /**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		 
	    public EtiketQueryBean() {
	    }
	
	    @PostConstruct
	    public void init() {
	       // setMaxResults(10);
	    }
	
	    @Override
	    protected Class<Etiket> getClassType() {
	        return Etiket.class;
	    }
	 
	
	  
	    public void  crHalihazirdakiEtiketler(Collection<String> etiketAdlari){
	    	 // apply this as a filter
	    	 
	        Root<Etiket> root = getCriteriaRoot();
	        setCriteria( root.get(Etiket_.text).in(etiketAdlari));
	      
	        
	    }
	 
	
	    // ***** REQUIRED FOR WELD < 1.1 FOR GLASSFISH BUG *****
	    @Override
	    public String getOrder() {
	        return super.getOrder();
	    }
	
	    @Override
	    public void setOrder(String order, String direction) {
	        super.setOrder(order,direction);
	    }
	
	    @Override
	    public void first() {
	        super.first();
	    }
	
	    @Override
	    public Integer getFirstResult() {
	        return super.getFirstResult();
	    }
	
	    @Override
	    public Long getLastFirstResult() {
	        return super.getLastFirstResult();
	    }
	
	    @Override
	    public Integer getMaxResults() {
	        return super.getMaxResults();
	    }
	
	    @Override
	    public int getNextFirstResult() {
	        return super.getNextFirstResult();
	    }
	
	    @Override
	    public Integer getPageCount() {
	        return super.getPageCount();
	    }
	
	    @Override
	    public int getPreviousFirstResult() {
	        return super.getPreviousFirstResult();
	    }
	
	    @Override
	    public Long getResultCount() {
	        return super.getResultCount();
	    }
	
	    @Override
	    public List<Etiket> getResultList() {
	        return super.getResultList();
	    }
	
	    @Override
	    public Etiket getSingleResult() {
	        return super.getSingleResult();
	    }
	
	    @Override
	    public boolean isNextExists() {
	        return super.isNextExists();
	    }
	
	    @Override
	    public boolean isPaginated() {
	        return super.isPaginated();
	    }
	
	    @Override
	    public boolean isPreviousExists() {
	        return super.isPreviousExists();
	    }
	
	    @Override
	    public void last() {
	        super.last();
	    }
	
	    @Override
	    public void next() {
	        super.next();
	    }
	
	    @Override
	    public void previous() {
	        super.previous();
	    }
	
	    @Override
	    public void setFirstResult(Integer firstResult) {
	        super.setFirstResult(firstResult);
	    }
	
	    @Override
	    public void setMaxResults(Integer maxResults) {
	        super.setMaxResults(maxResults);
	    }
	
	    @Override
	    public void refresh() {
	        super.refresh();
	    }
	}
